package com.pzr.soccer.plan.rabbit;

import com.pzr.soccer.match.model.GameWrapper;
import com.pzr.soccer.plan.service.ScanChangeGameProcessor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ChangedGameReceiver {
    @Autowired
    ScanChangeGameProcessor scanChangeGameProcessor;
    @RabbitListener(queues = "Queue_Today_Game_Changed_Full")
    public void processChangedGameForPlan(GameWrapper wrapper){
         log.info("change game to plan receiver1 接收到  : " + wrapper.getId());
         scanChangeGameProcessor.scanMatchForPlans(wrapper);
    }

}
